﻿@model KL.Store.Web.Models.AccountEditModel
@using KL.Store.Core
@{
    ViewBag.Title = "Hesap Bilgilerini Düzenle";
    ViewBag.hasSub = "true";
    Layout = "~/Views/Shared/" + Parameters.Layout + ".cshtml";
    var columnCssClass = "col-xs-12 col-sm-12 col-md-3 col-lg-2 left first last";
    var contentCssClass = "col-xs-12 col-sm-12 col-md-9 col-lg-10 right";
    if (Parameters.Theme == "DK" || Parameters.Theme == "EO")
    {
        columnCssClass = "col-xs-12 col-sm-12 col-md-4 col-lg-3 left first last";
        contentCssClass = "col-xs-12 col-sm-12 col-md-8 col-lg-9 right";
    }
    else if (Parameters.Theme == "WU")
    {
        columnCssClass = "col-xs-12 col-sm-12 col-md-4 col-lg-3 left";
        contentCssClass = "col-xs-12 col-sm-12 col-md-8 col-lg-9 right";
    }
}
@if (Parameters.Theme != "HA")
{
    <div class="breadcrumb col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="bcBorder"></div>
        <div class="bcLinks">
            <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="/" itemprop="url">
                    <span itemprop="title">Anasayfa</span>
                </a>›
            </div>
            <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="/Account/Index" itemprop="url">
                    <span itemprop="title">Hesabım</span>
                </a>›
            </div>
            <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="/Account/Edit" itemprop="url">
                    <span itemprop="title">Hesap Bilgilerini Düzenle</span>
                </a>
            </div>
        </div>
        <div class="bcBorder"></div>
    </div>
    <div class="clearfix"></div>
}

<div class="@columnCssClass">
    @if (Parameters.ShowCategoryOnAccountPages)
    {
        Html.RenderAction("Categories", "Partials");
    }
    @{ Html.RenderAction("Account", "Partials"); }
    @{ Html.RenderAction("Information", "Partials"); }
</div>
<div class="@contentCssClass">
    <div class="content">
        <h1>Hesap Bilgileri</h1>
        @using (Html.BeginForm(null, null, null, FormMethod.Post, new { name = "edit", id = "edit", @class = "form-horizontal" }))
        {
            <div class="form-group">
                <label for="FirstName" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Adınız<span class="requireStar">*</span> : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.FirstName)
                </div>
            </div>
            <div class="form-group">
                <label for="LastName" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Soyadınız<span class="requireStar">*</span> : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.LastName, new { @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.LastName)
                </div>
            </div>
            <div class="form-group">
                <label for="Email" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">E-Posta Adresiniz<span class="requireStar">*</span> : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.Email, new { @type = "email", @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Email)
                </div>
            </div>
            <div class="form-group">
                <label for="ConfirmEmail" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">E-Posta Adresiniz (Tekrar)<span class="requireStar">*</span> : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.ConfirmEmail, new { @type = "email", @class = "form-control", @value = Model.Email })
                    @Html.ValidationMessageFor(model => model.ConfirmEmail)
                </div>
            </div>
            <div class="form-group">
                <label for="Mobile" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Mobil Telefon Numaranız<span class="requireStar">*</span> : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.Mobile, new { @type = "tel", @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Mobile)
                </div>
            </div>
            <div class="form-group">
                <label for="Phone" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Telefon Numaranız<span class="requireStar">*</span> : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.Phone, new { @type = "tel", @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Phone)
                </div>
            </div>
            <div class="form-group">
                <label for="Fax" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Faks Numaranız : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.Fax, new { @type = "tel", @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.Fax)
                </div>
            </div>
            <div class="form-group">
                <label for="PhoneInternational" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Yurtdışı Telefon No : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @Html.TextBoxFor(model => model.PhoneInternational, new { @type = "tel", @class = "form-control" })
                    @Html.ValidationMessageFor(model => model.PhoneInternational)
                </div>
            </div>
            <div class="form-group">
                <label for="PhoneInternational" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Doğum Tarihiniz : </label>
                <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                    @{
            var days = new List<SelectListItem>();
            days.Add(new SelectListItem { Text = "Gün", Value = "0" });
            for (var i = 1; i <= 31; i++)
            {
                days.Add(new SelectListItem { Text = i.ToString("00"), Value = i.ToString() });
            }
            var months = new List<SelectListItem> {
                            new SelectListItem {Text = "Ay", Value = "0"},
                            new SelectListItem {Text = "01", Value = "1"},
                            new SelectListItem {Text = "02", Value = "2"},
                            new SelectListItem {Text = "03", Value = "3"},
                            new SelectListItem {Text = "04", Value = "4"},
                            new SelectListItem {Text = "05", Value = "5"},
                            new SelectListItem {Text = "06", Value = "6"},
                            new SelectListItem {Text = "07", Value = "7"},
                            new SelectListItem {Text = "08", Value = "8"},
                            new SelectListItem {Text = "09", Value = "9"},
                            new SelectListItem {Text = "1O", Value = "10"},
                            new SelectListItem {Text = "11", Value = "11"},
                            new SelectListItem {Text = "12", Value = "12"},
                          };
            var years = new List<SelectListItem>();
            years.Add(new SelectListItem { Text = "Yıl", Value = "0" });
            for (var i = 2007; i >= 1910; i--)
            {
                years.Add(new SelectListItem { Text = i.ToString(), Value = i.ToString() });
            }
                    }
                    @Html.DropDownListFor(x => x.SetBirthDate.Day, days, new { @class = "form-control left", @style = "width:90px;" })
                    @Html.DropDownListFor(x => x.SetBirthDate.Month, months, new { @class = "form-control left", @style = "width:90px; margin-left:10px" })
                    @Html.DropDownListFor(x => x.SetBirthDate.Year, years, new { @class = "form-control left", @style = "width:90px; margin-left:10px" })
                    @Html.ValidationMessageFor(model => model.BirthDay)
                </div>
            </div>
            @Html.ValidationSummary(true, "Kayıt işlemi başarısız oldu. Lütfen eksik bilgileri kontrol ediniz.")
            <div class="hidden-xs hidden-sm col-md-3 col-lg-3"></div>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6" style="padding-left: 6px;">
                <a href="/Account/Index" class="btn btn-custom1">Geri</a>
                <input type="submit" class="btn btn-custom1" value="Kaydet" />
            </div>
        }
    </div>
</div>
@if (Parameters.Theme == "JJ")
{
    <script>
        $(document).ready(function ()
        {
            if ($(window).width() < 980)
            {
                $(".breadcrumb").parent().attr("class", $(".breadcrumb").parent().attr("class") + " first last");
            }
        });
    </script>
}
@if (Parameters.WebSiteTrackingCode != "")
{ 
    <script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', '@Parameters.WebSiteTrackingCode']);
        _gaq.push(['_setDomainName', '@Parameters.WebSiteTrackingDomainName']);
        _gaq.push(['_setAllowLinker', true]);
        _gaq.push(['_trackPageview']);

        (function ()
        {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
}